package cn.uniqueinfo.dp.controller;

import cn.uniqueinfo.dp.controller.base.BaseController;
import cn.uniqueinfo.dp.service.IFormAuthService;
import cn.uniqueinfo.dp.vo.FormAuthVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author:朱元勋
 * @mail:395910063@qq.com
 * @date:2019-01-30 10:21:51
 * @description:业务表单数据权限
 */
@Slf4j
@Controller
@RequestMapping(value = "/formauth")
public class FormAuthController extends BaseController<FormAuthVO> {
    private IFormAuthService service;

    public FormAuthController(IFormAuthService service) {
        this.service = service;
        this.baseService = service;
        this.ctlName = "formauth";
        this.tipName = "业务表单数据权限";
    }

    @GetMapping("/find")
    @ResponseBody
    public List<FormAuthVO> dd(@RequestParam(value="fn") String formName){
        return this.service.findByFormName(formName);
    }
}
